﻿@model ESN.Models.CanvasSession
@{
    ViewBag.Title = "Canvas " + Model.Title;
}

<h2>@ESN.Languages.LangString.Load("create_by", "Canvas") @Model.Profiles.DisplayName</h2>
<script src="/Scripts/fabric.js" type="text/javascript"></script>
<script src="/Scripts/jquery.signalR.js" type="text/javascript"></script>
<script src="/signalr/hubs" type="text/javascript"></script>
<script src="/Scripts/esnCanvas.js" type="text/javascript" ></script>
<script src="/Scripts/jscolor.js" type="text/javascript" ></script>
<script type="text/javascript">
$(document).ready(function(){
    GroupId = "@ViewBag.GroupId";
    $("#canvasRadio").buttonset();
    $("#canvasClear").buttonset();
});
</script>
<div>
    <input type="text" value="@HttpContext.Current.Request.Url.AbsoluteUri" style="width:590px;margin-bottom:10px;" />
</div>
<div>
@if (ViewBag.readOnly)
{
    <canvas id="myCanvas" style="border:1px solid #c3c3c3;" width="600" height="400"></canvas>
}
else
{
    <div id="canvasRadio" style="font-size:80%;">
		<input type="radio" id="radio1" name="canvasTool" class="canvasTool" value="0" checked="checked" /><label for="radio1">@ESN.Languages.LangString.Load("blank", "Canvas")</label>
		<input type="radio" id="radio2" name="canvasTool" class="canvasTool" value="1" /><label for="radio2">@ESN.Languages.LangString.Load("separate_line", "Canvas")</label>
		<input type="radio" id="radio3" name="canvasTool" class="canvasTool" value="2" /><label for="radio3">@ESN.Languages.LangString.Load("continuous_line", "Canvas")</label>
		<input type="radio" id="radio4" name="canvasTool" class="canvasTool" value="3" /><label for="radio4">@ESN.Languages.LangString.Load("firework_line", "Canvas")</label>
		<input type="radio" id="radio5" name="canvasTool" class="canvasTool" value="4" /><label for="radio5">@ESN.Languages.LangString.Load("pen", "Canvas")</label>
        <input type="radio" id="radio6" name="canvasTool" class="canvasTool" value="5" /><label for="radio6">@ESN.Languages.LangString.Load("rectangle", "Canvas")</label>
        <input type="radio" id="radio7" name="canvasTool" class="canvasTool" value="6" /><label for="radio7">@ESN.Languages.LangString.Load("circle", "Canvas")</label>
        <input type="radio" id="radio8" name="canvasTool" class="canvasTool" value="7" /><label for="radio8">@ESN.Languages.LangString.Load("triangle", "Canvas")</label>
	</div>
    <div>
        <span>@ESN.Languages.LangString.Load("size", "Canvas"):</span> <input type="range" id="scale-control" value="10" min="2" max="20" step="2">
        <span>@ESN.Languages.LangString.Load("opacity", "Canvas"):</span> <input type="range" id="Opacity" value="1" min="0" max="1" step="0.1">
        <input class="color {hash:true}" id="linecolor" value="ff3300" autocomplete="off" style="background-image: none; background-color: rgb(238, 255, 89); color: rgb(0, 0, 0); ">
    </div>
    <span id="d"><canvas id="myCanvas" style="border:1px solid #c3c3c3;" width="600" height="400"></canvas></span>
}
</div>
<div id="canvasClear">
        <input type="radio" id="radio9" name="canvasTool" class="canvasTool" value="8" /><label for="radio9">@ESN.Languages.LangString.Load("clear", "Canvas")</label>
        <input type="radio" id="radio10" name="canvasTool" class="canvasTool" value="9" /><label for="radio10">@ESN.Languages.LangString.Load("clear_selected", "Canvas")</label>
</div>
@if (ViewBag.allowChat)
{
<input type="text" id="msg" />
<input type="button" id="broadcast" value="@ESN.Languages.LangString.Load("broadcast", "Canvas")" />
<input type="button" id="disconnect" value="@ESN.Languages.LangString.Load("disconnect", "Canvas")" />
}
<table>
    <tr>
        <th>@ESN.Languages.LangString.Load("notices", "Canvas")</th>
        <th>@ESN.Languages.LangString.Load("meassage", "Canvas")</th>
    </tr>
    <tr>
        <td><div id="notices"></div></td>
        <td><div id="messages"></div></td>
    </tr>
</table>